﻿export default [
  { path: '/user', layout: false, routes: [{ path: '/user/login', component: './User/Login' }] },
  {
    path: '/user',
    layout: false,
    routes: [{ path: '/user/register', component: './User/Register' }],
  },
  { path: '/welcome', icon: 'smile', component: './Welcome' },
  { path: '/add/chart', name: '智能分析', icon: 'smile', component: './AddChart' },
  { path: '/add/chartAsync', name: '智能分析(异步)', icon: 'smile', component: './AddChartAsync' },
  { path: '/haiguit', name: '海龟汤', icon: 'robot', component: './HaiGuiT' },
  { path: '/my_chart', name: '我的图表', icon: 'smile', component: './MyChart' },
  {
    path: '/admin',
    name: '管理',
    icon: 'setting',
    access: 'canAdmin',
    routes: [
      { path: '', redirect: 'sub-page' }, // 相对路径
      // { path: 'sub-page', name: '所有图表', component: './AllChart' },
      { path: 'chatHistory', name: '聊天记录', component: './AllChat' },
    ],
  },
  { path: '/', redirect: '/welcome' },
  { path: '*', layout: false, component: './404' },
];
